package com.ruoyi.boat.service.impl;

import com.ruoyi.boat.domain.PathPoint;
import com.ruoyi.boat.mapper.PathPointMapper;
import com.ruoyi.boat.service.IPathPointService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 路径点Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-01
 */
@Service
public class PathPointServiceImpl implements IPathPointService 
{
    @Autowired
    private PathPointMapper pathPointMapper;

    /**
     * 查询路径点
     * 
     * @param id 路径点主键
     * @return 路径点
     */
    @Override
    public PathPoint selectPathPointById(Long id)
    {
        return pathPointMapper.selectPathPointById(id);
    }

    /**
     * 查询路径点列表
     * 
     * @param pathPoint 路径点
     * @return 路径点
     */
    @Override
    public List<PathPoint> selectPathPointList(PathPoint pathPoint)
    {
        return pathPointMapper.selectPathPointList(pathPoint);
    }

    /**
     * 新增路径点
     * 
     * @param pathPoint 路径点
     * @return 结果
     */
    @Override
    public int insertPathPoint(PathPoint pathPoint)
    {
        return pathPointMapper.insertPathPoint(pathPoint);
    }

    /**
     * 修改路径点
     * 
     * @param pathPoint 路径点
     * @return 结果
     */
    @Override
    public int updatePathPoint(PathPoint pathPoint)
    {
        return pathPointMapper.updatePathPoint(pathPoint);
    }

    /**
     * 批量删除路径点
     * 
     * @param ids 需要删除的路径点主键
     * @return 结果
     */
    @Override
    public int deletePathPointByIds(String ids)
    {
        return pathPointMapper.deletePathPointByIds(Convert.toStrArray(ids));
    }

    @Override
    public int setPathPointBeSentByIds(String ids) {
        return pathPointMapper.setPathPointBeSentByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除路径点信息
     * 
     * @param id 路径点主键
     * @return 结果
     */
    @Override
    public int deletePathPointById(Long id)
    {
        return pathPointMapper.deletePathPointById(id);
    }
}
